-
Notifications
You must be signed in to change notification settings - Fork 23.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
document ansible_group_priority #28777
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved with copy edits. Thanks @bcoca!
.. _behavioral_parameters: | ||
|
||
List of Behavioral Inventory Parameters | ||
+++++++++++++++++++++++++++++++++++++++ | ||
|
||
As alluded to above, setting the following variables controls how ansible interacts with remote hosts. | ||
As described above, setting the following variables control how Ansible interacts with remote hosts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setting [these] controls
= setting the following variables controls
or
the following variables control
(drop "setting")
@@ -867,6 +867,8 @@ Basically, anything that goes into "role defaults" (the defaults folder inside t | |||
If multiple groups have the same variable, the last one loaded wins. | |||
If you define a variable twice in a play's vars: section, the 2nd one wins. | |||
.. note:: the previous describes the default config `hash_behavior=replace`, switch to 'merge' to only partially overwrite. | |||
.. note:: Group loading follows parent/child relationships. Groups of the same 'patent/child' level are then merged following alphabetical order. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/patent/parent/
* document ansible_group_priority * Copy edit pass
This PR is missing from stable 2.4 branch and therefore it's missing from docs.ansible.com, could it be merge into stable please? |
Has this been tested by setting group_variable_priority inside a
Whereas, setting this within the inventory file as:
Works as expected. |
The documentation doesn't show you how to use this feature. Where does this go? Can I use this in group_vars or in the inventory file? Are there examples that show how this works? |
@hanej I have found this https://github.com/ansible/ansible/blob/76ff3e9efc0a74799bc2962508fdfcc8c2a920b6/docs/docsite/rst/user_guide/intro_inventory.rst#how-variables-are-merged But not sure how to make use it in a |
The docs committed in ansible#28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236
The docs committed in #28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236
The docs committed in ansible#28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236 (cherry picked from commit 4fa2fb9)
The docs committed in ansible#28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236 (cherry picked from commit 4fa2fb9)
The docs committed in #28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236 (cherry picked from commit 4fa2fb9)
The docs committed in #28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236 (cherry picked from commit 4fa2fb9)
The docs committed in ansible#28777 were inconsistent. This clarifies that the default `ansible_group_priority` is `1`.[1][2] [1] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/inventory/group.py#L40 [2] https://github.com/ansible/ansible/blob/153c9bd/lib/ansible/cli/inventory.py#L236
SUMMARY
documenting new feature
fixes #28769
ISSUE TYPE
COMPONENT NAME
inventory
ANSIBLE VERSION